import { Controller, Get, Session } from '@nestjs/common';
import { CaptchaService } from './captcha.service';
import { Public } from 'src/utils/skip.jwt';

@Public()
@Controller('verifyCode')
export class CaptchaController {
  constructor(private readonly captchaService: CaptchaService) {}

  @Get()
  getVerifyCode(@Session() session) {
    const captcha = this.captchaService.generateCaptcha(session)

    return captcha
  }
}
